package ac.neec.data;

import java.io.Serializable;
import java.util.List;

import ac.neec.db.service.SQLManager;

public class RecordDetail implements Serializable{
	private int detailID;
	private RecordDate recordDate;
	private SpecificActivities activities;
	private String measurementTime;
	private int heartRateTheory;
	private int heartRatePoint;
	private float calorieTheory;
	private float caloriePoint;
	private HeartRate graph;

	public RecordDetail(RecordDate recordDate, SpecificActivities specificActivities, String measurementTime,
			int heartRateTheory, int heartRatePoint, float calorieTheory, float caloriePoint, byte[] graph) {
		setRecordDate(recordDate);
		setActivities(specificActivities);
		setMeasurementTime(measurementTime);
		setHeartRateTheory(heartRateTheory);
		setHeartRatePoint(heartRatePoint);
		setCalorieTheory(calorieTheory);
		setCaloriePoint(caloriePoint);
		setGraph(graph);
	}
	public RecordDetail(int detailID, int recordDateID, int specificActivitiesID, String measurementTime,
			int heartRateTheory, int heartRatePoint, float calorieTheory, float caloriePoint, byte[] graph) {
		setDetailID(detailID);
		setRecordDate(recordDateID);
		setActivities(specificActivitiesID);
		setMeasurementTime(measurementTime);
		setHeartRateTheory(heartRateTheory);
		setHeartRatePoint(heartRatePoint);
		setCalorieTheory(calorieTheory);
		setCaloriePoint(caloriePoint);
		setGraph(graph);
	}
	public int getDetailID() {
		return detailID;
	}

	public void setDetailID(int detailID) {
		this.detailID = detailID;
	}

	public RecordDate getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(RecordDate recordDate) {
		this.recordDate = recordDate;
	}
	public void setRecordDate(int dateID) {
		recordDate = SQLManager.selectRecordDateMatch(dateID);
	}

	public SpecificActivities getActivities() {
		return activities;
	}

	public void setActivities(SpecificActivities activities) {
		this.activities = activities;
	}
	public void setActivities(int activitiesID) {
		activities = SQLManager.selectSpecificActivitiesmMatch(activitiesID);
	}


	public String getMeasurementTime() {
		return measurementTime;
	}

	public void setMeasurementTime(String measurementTime) {
		this.measurementTime = measurementTime;
	}

	public int getHeartRatePoint() {
		return heartRatePoint;
	}

	public void setHeartRatePoint(int heartRatePoint) {
		this.heartRatePoint = heartRatePoint;
	}

	public int getHeartRateTheory() {
		return heartRateTheory;
	}

	public void setHeartRateTheory(int heartRateTheory) {
		this.heartRateTheory = heartRateTheory;
	}

	public float getCalorieTheory() {
		return calorieTheory;
	}

	public void setCalorieTheory(float calorieTheory) {
		this.calorieTheory = calorieTheory;
	}

	public float getCaloriePoint() {
		return caloriePoint;
	}

	public void setCaloriePoint(float caloriePoint) {
		this.caloriePoint = caloriePoint;
	}

	public List<Integer> getGraph() {
		return graph.getHeartRates();
	}

	public byte[] getBytes() {
		return graph.getHeartRatesBytes();
	}
	public void setGraph(byte[] graph) {
		this.graph = new HeartRate(graph);
	}


}
